﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KingerRobot.PCRBW.Dao;
partial class Db : K8.EF.DbContext
{
    /// <summary>
    /// 任务
    /// </summary>
    public DbSet<POWcsTask> WcsTasks { get; set; }
}

/// <summary>
/// 任务
/// 表[wcs_task]
/// </summary>
[Table("wcs_task")]
public class POWcsTask
{
    /// <summary>
    /// 主键，通过雪花算法生成
    /// 主键[wcs_task.objid)]
    /// </summary>
    [Key]
    [Column("objid")]
    public long Id { get; set; }
    /// <summary>
    /// 流水号
    /// [wcs_task.task_no)]
    /// </summary>
    [Column("task_no")]
    public int? TaskNo { get; set; }
    /// <summary>
    /// 启动设备
    /// [wcs_task.start_equip)]
    /// </summary>
    [Column("start_equip")]
    public long? StartEquip { get; set; }
    /// <summary>
    /// 开始地址
    /// [wcs_task.start_loc)]
    /// </summary>
    [Column("start_loc")]
    public long? StartLoc { get; set; }
    /// <summary>
    /// 当前设备
    /// [wcs_task.current_equip)]
    /// </summary>
    [Column("current_equip")]
    public long? CurrentEquip { get; set; }
    /// <summary>
    /// 当前地址
    /// [wcs_task.current_loc)]
    /// </summary>
    [Column("current_loc")]
    public long? CurrentLoc { get; set; }
    /// <summary>
    /// 目标设备
    /// [wcs_task.target_equip)]
    /// </summary>
    [Column("target_equip")]
    public long? TargetEquip { get; set; }
    /// <summary>
    /// 目标地址
    /// [wcs_task.target_loc)]
    /// </summary>
    [Column("target_loc")]
    public long? TargetLoc { get; set; }
    /// <summary>
    /// [wcs_task.cache_loc)]
    /// </summary>
    [Column("cache_loc")]
    public long? CacheLoc { get; set; }
    /// <summary>
    /// 任务状态:0创建;1可下发;2已下发;
    /// [wcs_task.task_status)]
    /// </summary>
    [Column("task_status")]
    public int? TaskStatus { get; set; }
    /// <summary>
    /// 任务类型:1入库任务;2出库任务;3桁架任务;4移库任务；5-滑台任务
    /// [wcs_task.task_type)]
    /// </summary>
    [Column("task_type")]
    public int? TaskType { get; set; }
    /// <summary>
    /// 任务组
    /// [wcs_task.task_group)]
    /// </summary>
    [Column("task_group")]
    public int? TaskGroup { get; set; }
    /// <summary>
    /// [wcs_task.task_group_count)]
    /// </summary>
    [Column("task_group_count")]
    public int? TaskGroupCount { get; set; }
    /// <summary>
    /// 组顺序号
    /// [wcs_task.task_group_index)]
    /// </summary>
    [Column("task_group_index")]
    public int? TaskGroupIndex { get; set; }
    /// <summary>
    /// 订单Id
    /// [wcs_task.order_id)]
    /// </summary>
    [Column("order_id")]
    public string OrderId { get; set; }
    /// <summary>
    /// 订单明细Id
    /// [wcs_task.detail_id)]
    /// </summary>
    [Column("detail_id")]
    public long? DetailId { get; set; }
    /// <summary>
    /// SKU
    /// [wcs_task.sku_id)]
    /// </summary>
    [Column("sku_id")]
    public long? SkuId { get; set; }
    /// <summary>
    /// [wcs_task.sku_code)]
    /// </summary>
    [Column("sku_code")]
    public string SkuCode { get; set; }
    /// <summary>
    /// [wcs_task.is_abnormal)]
    /// </summary>
    [Column("is_abnormal")]
    public bool? IsAbnormal { get; set; }
    /// <summary>
    /// 是否喷涂[1:喷涂；0:不喷涂]
    /// [wcs_task.is_spray)]
    /// </summary>
    [Column("is_spray")]
    public int? IsSpray { get; set; }
    /// <summary>
    /// 结束库位
    /// [wcs_task.finish_loc)]
    /// </summary>
    [Column("finish_loc")]
    public long? FinishLoc { get; set; }
    /// <summary>
    /// 结束方式
    /// [wcs_task.finish_mode)]
    /// </summary>
    [Column("finish_mode")]
    public int? FinishMode { get; set; }
    /// <summary>
    /// 结束时间
    /// [wcs_task.finish_time)]
    /// </summary>
    [Column("finish_time")]
    public DateTime? FinishTime { get; set; }
    /// <summary>
    /// 创建时间
    /// [wcs_task.create_time)]
    /// </summary>
    [Column("create_time")]
    public DateTime? CreateTime { get; set; }
    /// <summary>
    /// 更新时间
    /// [wcs_task.update_time)]
    /// </summary>
    [Column("update_time")]
    public DateTime? UpdateTime { get; set; }
    /// <summary>
    /// 是否可用 0:不可用  1:在用
    /// [wcs_task.use_flag)]
    /// </summary>
    [Column("use_flag")]
    public int? UseFlag { get; set; }
    /// <summary>
    /// [wcs_task.remark_memo)]
    /// </summary>
    [Column("remark_memo")]
    public string RemarkMemo { get; set; }
    /// <summary>
    /// [wcs_task.tooltip_memo)]
    /// </summary>
    [Column("tooltip_memo")]
    public string TooltipMemo { get; set; }
    /// <summary>
    /// [wcs_task.net_id)]
    /// </summary>
    [Column("net_id")]
    public long? NetId { get; set; }
    /// <summary>
    /// 车载任务的操作人
    /// [wcs_task.user_id)]
    /// </summary>
    [Column("user_id")]
    public long? UserId { get; set; }
    /// <summary>
    /// [wcs_task.vehicle_task_status)]
    /// </summary>
    [Column("vehicle_task_status")]
    public int? VehicleTaskStatus { get; set; }
    /// <summary>
    /// 车载中间表id
    /// [wcs_task.vehicle_id)]
    /// </summary>
    [Column("vehicle_id")]
    public long? VehicleId { get; set; }
    /// <summary>
    /// 线体任务编号
    /// [wcs_task.LineTaskNo)]
    /// </summary>
    [Column("LineTaskNo")]
    public int? Linetaskno { get; set; }
    /// <summary>
    /// 出库放胎位ID
    /// [wcs_task.house_output_loc)]
    /// </summary>
    [Column("house_output_loc")]
    public long? HouseOutputLoc { get; set; }
    /// <summary>
    /// 1 异常
    /// [wcs_task.call_delete)]
    /// </summary>
    [Column("call_delete")]
    public int? CallDelete { get; set; }
    /// <summary>
    /// 记录生成任务的mesproduct信息
    /// [wcs_task.mes_id)]
    /// </summary>
    [Column("mes_id")]
    public string MesId { get; set; }
    /// <summary>
    /// 任务初始类型 创建后不再改变 在biz中做区分
    /// [wcs_task.start_task_type)]
    /// </summary>
    [Column("start_task_type")]
    public int? StartTaskType { get; set; }
    /// <summary>
    /// mes成型机id
    /// [wcs_task.mch_id)]
    /// </summary>
    [Column("mch_id")]
    public string MchId { get; set; }
    /// <summary>
    /// 出库优先级 10 最优先 
    /// [wcs_task.out_order_priority)]
    /// </summary>
    [Column("out_order_priority")]

    public int? OutOrderPriority { get; set; }

    /// <summary>
    /// 入库异常原因
    /// [wcs_task.abnormal_code)]
    /// </summary>
    [Column("abnormal_code")]
    public int? AbnormalCode { get; set; }
    /// <summary>
    /// 1自动完成  2手动完成
    /// [wcs_task.finish_type)]
    /// </summary>
    [Column("finish_type")]
    public int? FinishType { get; set; }
    /// <summary>
    ///0：出库；1||2：人工出库；3：返库
    /// [wcs_task.finish_type)]
    /// </summary>
    [Column("mark_type")]
    public int? Mark { get; set; }
    /// <summary>
    /// 是否跨库 
    /// [wcs_task.finish_type)]
    /// </summary>
    [Column("is_cross")]
    public int? IsCross { get; set; }
    /// <summary>
    /// 物料Id 
    /// [wcs_task.material_id)]
    /// </summary>
    [Column("material_id")]
    public string MaterialId { get; set; }

    /// <summary>
    /// 人工操作状态0默认12人工删除13人工完成 15 wcs清理
    /// [wcs_task.task_wms_status)]
    /// </summary>
    [Column("task_wms_status")]
    public int? TaskWmsStatus { get; set; }
    /// <summary>
    /// 尺寸
    /// [wcs_task.task_wms_status)]
    /// </summary>
    [Column("innerdiameter")]
    public string Innerdiameter { get; set; }

    
}
